import 'package:flutter/material.dart';

class SearchWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      margin: EdgeInsets.only(left: 20, right: 20, top: 20),
      padding: EdgeInsets.all(12),
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.all(Radius.circular(10))
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Text("搜索", style: TextStyle(fontWeight: FontWeight.w600),),
          Container(
            margin: EdgeInsets.only(top: 5),
            padding: EdgeInsets.only(left: 10, right: 10),
            decoration: BoxDecoration(
              borderRadius: BorderRadius.all(Radius.circular(10)),
              border: Border.all(color: Colors.grey, width: 1)
            ),
            child: TextField(
              decoration: InputDecoration(
                hintText: "请输入你想搜索的内容",
                suffixIcon: Icon(Icons.search),
                border: InputBorder.none
              ),
            ),
          )
        ],
      ),
    );
  }
}
